<!DOCTYPE html>
<html>

<head>
    <base href="/">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>专业</title>

    <link href="plugins/switchery/dist/switchery.min.css" rel="stylesheet" />
    <link href="plugins/bootstrap-table/dist/bootstrap-table.min.css" rel="stylesheet" type="text/css" />
    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- select2 css -->
    <link href="plugins/select2/css/select2.css" rel="stylesheet" type="text/css" />
    <link href="plugins/bootstrap-select/dist/css/bootstrap-select.min.css" rel="stylesheet" />
    <!-- 公共css -->
    <link href="css/core.css" rel="stylesheet" type="text/css" />
    <link href="css/components.css" rel="stylesheet" type="text/css" />
    <link href="css/icons.css" rel="stylesheet" type="text/css" />
    <link href="css/pages.css" rel="stylesheet" type="text/css" />
    <link href="css/responsive.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->

    <style>
        .select2-selection .select2-selection--single {
            height: 38px;
        }
        /*不带搜索框的下拉框容器*/

        .select-container .btn-white {
            border: 1px solid #E3E3E3 !important;
            padding: 9px 12px;
        }
    </style>
    <script src="js/modernizr.min.js"></script>

</head>

<body class="fixed-left">

<div class="container">
    <div class="card-box">
        <!--===================================================-->
        <br>
        <div class="row">
            <div class="col-sm-12">

                <h4 class="m-t-0 header-title m-b-10"><b>实验桌使用记录</b></h4>
                <p class="text-muted font-13">
                    记录列表
                </p>
                <div class="accordion-group">
                    <div id="collapse-search" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <form id="search-form" modelAttribute="labTeachProject" class="form form-horizontal well clearfix">
                                <div class="row">



                                    <div class="col-xs-3 col-sm-3 col-md-3">
                                        <div class="form-group">
                                            <label for="userName" class="col-sm-3 control-label">学生姓名</label>
                                            <div class="col-sm-8">
                                                <input name="userName" id="userName"  htmlEscape="false" maxlength="64" class="form-control" />
                                            </div>
                                        </div>

                                    </div>


                                    <div class="col-xs-3 col-sm-3 col-md-3">
                                        <div class="form-group">
                                            <label for="className" class="col-sm-3 control-label">班级名称</label>
                                            <div class="col-sm-8">
                                                <input name="className" id="className"  htmlEscape="false" maxlength="64" class="form-control" />
                                            </div>
                                        </div>

                                    </div>

                                    <div class="col-xs-3 col-sm-3 col-md-3">
                                        <div class="form-group">
                                            <label for="courseName" class="col-sm-3 control-label">课程名称</label>
                                            <div class="col-sm-8">
                                                <input name="courseName" id="courseName"  htmlEscape="false" maxlength="64" class="form-control" />
                                            </div>
                                        </div>
                                    </div>



                                    <div class="col-xs-3 col-sm-3 col-md-3">
                                        <div class="form-group">
                                            <label for="projectName" class="col-sm-3 control-label">项目名称</label>
                                            <div class="col-sm-8">
                                                <input name="projectName" id="projectName"  htmlEscape="false" maxlength="64" class="form-control" />
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-xs-3 col-sm-3 col-md-3">
                                        <div class="form-group">
                                            <label for="deskid" class="col-sm-3 control-label">实验桌号</label>
                                            <div class="col-sm-8">
                                                <input name="deskid" id="deskid" htmlEscape="false" maxlength="64" class="form-control" />
                                            </div>
                                        </div>
                                    </div>







                                    <div class="col-xs-4 col-sm-4 col-md-4">
                                        <div style="margin-top:26px">
                                            <button id="search" type="button" class="btn btn-white" onclick="lab.searchTable();"><i
                                                    class="fa fa-search"></i> 查询
                                            </button>
                                            <button id="reset" type="reset" class="btn btn-white" onclick="lab.resetTable();"><i
                                                    class="fa fa-refresh"></i> 重置
                                            </button>
                                        </div>
                                    </div>
                                </div>

                            </form>
                        </div>
                    </div>
                </div>

                <div id="buttons-toolbar" class="button-list">

                    <button id="btn-export" class="btn btn-info" onclick="lab.export('#search-form', 'exportList')">
                        <i class="ti-export m-r-5"></i>导出
                    </button>

                    <a class="accordion-toggle btn btn-default" data-toggle="collapse" data-parent="#accordion2" href="#collapse-search">
                        <i class="fa fa-search"></i> 检索条件
                    </a>
                </div>
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
</div>
<!-- container -->

<script>
    var resizefunc = [];
</script>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>


<script src="js/jquery.core.js"></script>

<script src="plugins/layer/layer.js"></script>
<script src="plugins/switchery/dist/switchery.min.js"></script>
<script src="js/global.js"></script>

<script src="plugins/bootstrap-table/dist/bootstrap-table.min.js"></script>
<script src="plugins/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="js/bootstrap-table-defaults.js"></script>



<script>
    $(document).ready(function() {

        $('#bootstrap-table').bootstrapTable({
            url:  '/selectall',
            columns: [{
                checkbox: false,
            },
                {
                    field: 'userName',  align: 'center',
                    title: '学生姓名'
                },

                {
                    field: 'className',  align: 'center',
                    title: '班级名称'
                },
                {
                    field: 'courseName',  align: 'center',
                    title: '课程名称'
                },
                {
                    field: 'projectName',  align: 'center',
                    title: '项目名称'
                },
                {
                    field: 'deskid',  align: 'center',
                    title: '实验桌号'
                },



                {
                    title: '开始使用时间',  align: 'center',

                    formatter: function(value, row, index) {

                        if(row.startTime==null){

                            return '<span>' + '</span>';
                        }else{

                            return '<span>' + new Date(row.startTime).Format("yyyy-MM-dd hh:mm") + '</span>';

                        }




                    }
                },



                {
                    title: '结束使用时间',  align: 'center',

                    formatter: function(value, row, index) {

                        if(row.endTime==null){

                            return '<span>' + '</span>';
                        }else{

                            return '<span>' + new Date(row.endTime).Format("yyyy-MM-dd hh:mm") + '</span>';

                        }



                    }
                },





                {
                    field: 'startstatus',  align: 'center',
                    title: '开始使用设备状态'
                },
                {
                    field: 'endstatus',  align: 'center',
                    title: '结束使用设备状态'
                }



            ],
            toolbar: '#buttons-toolbar'
        });
        lab.initTableBtn();
    });
</script>
</body>

</html>